const columns = [
    {
        prop: 'username',
        label: '登录名'
    },
    {
        prop: 'name',
        label: '姓名'
    },
    {
        prop: 'employeeNumber',
        label: '工号'
    },
    {
        prop: 'sex',
        label: '性别'
    },
    {
        prop: 'organizationTitle',
        label: '所属机构'
    },
    {
        prop: 'telephone',
        label: '联系电话'
    },
    {
        prop: 'email',
        label: '邮件',
        width: 200
    },
    {
        prop: 'enabled',
        label: '启用'
    },
    {
        label: '操作',
        width: 300,
        operations: [
            {
                prop: 'edit',
                label: '编辑',
                auId: 110404,
                icon: 'el-icon-edit-outline'
            },
            {
                prop: 'delete',
                label: '删除',
                auId: 110405,
                icon: 'el-icon-circle-close-outline'
            },
            {
                prop: 'resetpassword',
                label: '重置密码'
            }
        ]
    }
]

const options = [
    {
        value: 'batchrefresh',
        label: '刷新'
    },
    {
        value: 'batchdelete',
        label: '批量删除'
    }
]

const enableOptions = [
    {
        id: true,
        title: '是'
    },
    {
        id: false,
        title: '否'
    }
]

const addFormItems = [
    {
        label: '所属机构',
        prop: 'organizationIds',
        name: 'cascader',
        props: {
            value: 'id',
            label: 'title',
            children: 'children'
        },
        validation: true
    },
    {
        label: '工号',
        prop: 'employeeNumber',
        name: 'input',
        validation: true
    },
    {
        label: '启用',
        prop: 'enabled',
        name: 'checkbox'
    },
    {
        label: '登录名',
        prop: 'username',
        name: 'input',
        validation: true
    },
    {
        label: '姓名',
        prop: 'name',
        name: 'input',
        validation: true
    },
    {
        label: '密码',
        prop: 'password',
        name: 'input',
        validation: true
    },
    {
        label: '确认密码',
        prop: 'confirmPassword',
        name: 'input',
        validation: true
    },
    {
        label: '性别',
        prop: 'sex',
        type: 'single',
        name: 'checkbox-select',
        options: [
            {
                label: '男',
                value: '1'
            },
            {
                label: '女',
                value: '2'
            },
            {
                label: '保密',
                value: '3'
            }
        ]
    },
    {
        label: '岗位名称',
        prop: 'jobTitle',
        name: 'input'
    },
    {
        label: '邮件',
        prop: 'email',
        name: 'input'
    },
    {
        label: '电话',
        prop: 'telephone',
        name: 'input'
    }
]

const editFormItems = [
    {
        label: '所属机构',
        prop: 'organizationIds',
        name: 'cascader',
        props: {
            value: 'id',
            label: 'title',
            children: 'children'
        }
    },
    {
        label: '工号',
        prop: 'employeeNumber',
        name: 'input'
    },
    {
        label: '启用',
        prop: 'enabled',
        name: 'checkbox'
    },
    {
        label: '姓名',
        prop: 'name',
        name: 'input'
    },
    {
        label: '登录名',
        prop: 'username',
        name: 'input'
    },
    {
        label: '性别',
        prop: 'sex',
        type: 'single',
        name: 'checkbox-select',
        options: [
            {
                label: '男',
                value: '1'
            },
            {
                label: '女',
                value: '2'
            },
            {
                label: '保密',
                value: '3'
            }
        ]
    },
    {
        label: '岗位名称',
        prop: 'organizationTitle',
        name: 'input'
    },
    {
        label: '邮件',
        prop: 'email',
        name: 'input'
    },
    {
        label: '电话',
        prop: 'telephone',
        name: 'input'
    }
]

const passwordFormItems = [
    {
        label: '用户名',
        prop: 'username',
        disabled: true,
        name: 'input'
    },
    {
        label: '姓名',
        prop: 'name',
        disabled: true,
        name: 'input'
    },
    {
        label: '重置密码',
        prop: 'password',
        name: 'input'
    }
]

const exportColumns = [
    {
        prop: 'username',
        label: '登录名'
    },
    {
        prop: 'name',
        label: '姓名'
    },
    {
        prop: 'employeeNumber',
        label: '工号'
    },
    {
        prop: 'sex',
        label: '性别'
    },
    {
        prop: 'organizationTitle',
        label: '岗位名称'
    },
    {
        prop: 'telephone',
        label: '联系电话'
    },
    {
        prop: 'email',
        label: '邮件',
        width: 200
    },
    {
        prop: 'enabled',
        label: '启用'
    }
]

export default {
    columns,
    options,
    enableOptions,
    addFormItems,
    editFormItems,
    passwordFormItems,
    exportColumns
}
